/*
 * @Copyright: Copyright (C) AMCAX, All rights reserved.
 * @Author: 殷建峰
 * @Date: 2025-02-08 17:27:45
 * @LastEditTime: 2025-02-10 16:53:14
 * @LastEditors: 殷建峰
 * @Description:
 */
import { widgetManager } from '@/common/managers/widgetManager';
import { Database } from './panels/Database';

export interface ILeftMenuItem {
  id: string; // 唯一标识
  label: string; // 名称
  icon: string; // 图标
  boxWidth?: number; // 宽度
  focus?: boolean; // 是否选中
  type?: 'panel' | 'modal'; // 类型
  fixed?: boolean; // 默认是否固定
  describe?: string | JSX.Element; // 描述
  create: (onClose?: () => void) => JSX.Element; // 创建组件
}
export const LeftPanelMenu = [Database];
// 初始化左侧面板
widgetManager.leftPanelUpdata(
  LeftPanelMenu.filter((item) => item.fixed).map((item) => item.id),
);
